package chap3_10;

public class Exer3_10_6 {
    public static void main(String[] args) {
        int count = 0;
        for (int i = 1; ; i++) {
            int n = i;
            while (i % 2 == 0) {
                i = i / 2;
            }
            while (i % 3 == 0) {
                i = i / 3;
            }
            while (i % 5 == 0) {
                i = i / 5;
            }
            if (i == 1) {
                count++;
                if (count <= 150) {
                    System.out.print(n+"\t");
                    if(count%10==0){
                        System.out.println();
                    }
                }
            }
            i = n;
        }
    }
}
